#2020年省赛-填空题 蛇形填数
# 1  2  6  7  15 16 28 29 45
# 3  5  8  14 17 27 30 44
# 4  9  13 18 26 31 43
# 10 12 19 25 32 42
# 11 20 24 33 41
# 21 23 34 40
# 22 35 39
# 36 38
# 37

# a[1] = 1
# a[2] = 5
# a[3] = 13
# a[4] = 25
# a[5] = 41
# a[n] = a[n-1] + 4*(n-1)

a = 1
for i in range(1, 21):
  a += 4 * (i - 1)
print(a)